package system;

import delegate.*;

public abstract class Controller 
{
	private EventSystem eventSystem;
	
	public IAction1<Integer> onKeyPreseed;
	
	public Controller()
	{
		eventSystem = (EventSystem)ServiceLocator.instance().getService(EService.EventSystem);
		onKeyPreseed = this::onKeyPressed;
		eventSystem.keyPressed.add(onKeyPreseed);
	}
	
	protected abstract void onKeyPressed(Integer keyCode);
}
